package com.LFLWZ.serivceImpl;


import com.LFLWZ.beans.POJO.LecturerApply;
import com.LFLWZ.beans.Vo.LecturerVo;
import com.LFLWZ.mapper.LecturerApplyMapper;
import com.LFLWZ.service.LecturerApplyService;
import com.alibaba.dubbo.config.annotation.Service;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;

/**
 * 讲师信息表(Lecturer)表服务实现类
 *
 * @author makejava
 * @since 2020-12-12 16:39:43
 */
@Service
public class LecturerApplyServiceImpl implements LecturerApplyService {
    @Autowired
    private LecturerApplyMapper lecturerApplyMapper;

    /**
     * 通过ID查询单条数据
     *
     * @param //id 主键
     * @return 实例对象
     */
    @Override
    public LecturerApply queryById(Integer uid){
        return this.lecturerApplyMapper.queryById(uid);
    }

   @Override
    public List<LecturerApply> queryAllByLimit() {
        return lecturerApplyMapper.queryAllByLimit();
    }


    /**
     * 查询多条数据
     *
     * @param offset 查询起始位置
     * @param limit  查询条数
     * @return 对象列表
     */

    /**
     * 新增数据
     *
     * @param lecturerApply 实例对象
     * @return 实例对象
     */
    @Override
    public LecturerApply insert(LecturerApply lecturerApply) {
        this.lecturerApplyMapper.insert(lecturerApply);
        return lecturerApply;
    }

    @Override
    public int add(LecturerApply lecturerApply) {
        return lecturerApplyMapper.add(lecturerApply);
    }

    /**
     * 修改数据
     *
     * @param lecturerApply 实例对象
     * @return 实例对象
     */
    @Override
    public int update(LecturerApply lecturerApply) {
        return this.lecturerApplyMapper.update(lecturerApply);
    }

    @Override
    public int upd(LecturerApply lecturerApply,Integer id) {
        return lecturerApplyMapper.upd(lecturerApply,id);
    }


    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    @Override
    public boolean deleteById(Integer id) {
        return this.lecturerApplyMapper.deleteById(id) > 0;
    }

    @Override
    public List<LecturerApply> queryAll() {
        return null;
    }
}